package com.ruoyi.mapper.purchase;

import com.ruoyi.domain.purchase.MesPurchaseReceipt;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 采购入库主表Mapper接口
 * 
 * @author ruoyi
 * @date 2024-01-01
 */
@Mapper
public interface MesPurchaseReceiptMapper {
    /**
     * 查询采购入库主表
     * 
     * @param receiptId 采购入库主表主键
     * @return 采购入库主表
     */
    public MesPurchaseReceipt selectMesPurchaseReceiptByReceiptId(Long receiptId);

    /**
     * 查询采购入库主表列表
     * 
     * @param mesPurchaseReceipt 采购入库主表
     * @return 采购入库主表集合
     */
    public List<MesPurchaseReceipt> selectMesPurchaseReceiptList(MesPurchaseReceipt mesPurchaseReceipt);

    /**
     * 新增采购入库主表
     * 
     * @param mesPurchaseReceipt 采购入库主表
     * @return 结果
     */
    public int insertMesPurchaseReceipt(MesPurchaseReceipt mesPurchaseReceipt);

    /**
     * 修改采购入库主表
     * 
     * @param mesPurchaseReceipt 采购入库主表
     * @return 结果
     */
    public int updateMesPurchaseReceipt(MesPurchaseReceipt mesPurchaseReceipt);

    /**
     * 删除采购入库主表
     * 
     * @param receiptId 采购入库主表主键
     * @return 结果
     */
    public int deleteMesPurchaseReceiptByReceiptId(Long receiptId);

    /**
     * 批量删除采购入库主表
     * 
     * @param receiptIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMesPurchaseReceiptByReceiptIds(Long[] receiptIds);

    /**
     * 根据入库单号查询
     * 
     * @param receiptCode 入库单号
     * @return 采购入库主表
     */
    public MesPurchaseReceipt selectMesPurchaseReceiptByReceiptCode(String receiptCode);

    /**
     * 查询已入库的订单列表（用于历史记录）
     * 
     * @param mesPurchaseReceipt 采购入库主表
     * @return 采购入库主表集合
     */
    public List<MesPurchaseReceipt> selectReceivedReceiptList(MesPurchaseReceipt mesPurchaseReceipt);

    /**
     * 根据供应商ID查询入库单列表
     * 
     * @param supplierId 供应商ID
     * @return 入库单列表
     */
    public List<MesPurchaseReceipt> selectReceiptListBySupplierId(Long supplierId);

    /**
     * 根据仓库ID查询入库单列表
     * 
     * @param warehouseId 仓库ID
     * @return 入库单列表
     */
    public List<MesPurchaseReceipt> selectReceiptListByWarehouseId(Long warehouseId);

    /**
     * 根据状态查询入库单列表
     * 
     * @param status 状态
     * @return 入库单列表
     */
    public List<MesPurchaseReceipt> selectReceiptListByStatus(String status);
}